<template>
	<view>
		<view class="title-back" :class="{'title-top-padding':!paddingNo}">

		</view>
		<view class="title" :class="{'title-top-padding':!paddingNo}">
			<image class="left" @tap="back()" :src="$img('/static/2021-08-24/back-black.png')" mode="widthFix"></image>
			<view class="center">
				{{title}}
			</view>
			<view class="right">
				<view class="wancheng" v-if="type == 'wancheng'" @click="wancheng()">
					完成
				</view>
				<view class="wancheng" v-if="type == 'wancheng_end'">
					已完成
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "title-bar",
		props:["title","type","paddingNo"],
		data() {
			return {
				
			};
		},
		methods:{
			back(){
				uni.navigateBack();
			},
			wancheng(){
				this.$emit('wancheng');
			}
		}
		
	}
</script>

<style lang="scss" scoped>
	@import "./title-bar.scss";
</style>
